package com.gorillalogic.scrummonkey.dms {
	import mx.rpc.AsyncToken;

	public class IterationService extends _Super_IterationService {
		public static var service:IterationService = new IterationService();

		public override function deleteIteration(iteration:Iteration):AsyncToken {
			//first, re-assign any objectives to the parent release
			iteration.objectives.toArray().forEach(
				function(o:Objective, idx:int, items:Array):void {
					o.unassign(iteration);
				});

			//lastly, delete the iteration
			return super.deleteIteration(iteration);
		}
	}
}
